package bean;

/**
 * UserSnapDestId entity.
 * 
 * @author MyEclipse Persistence Tools
 */

public class UserSnapDestId implements java.io.Serializable {

	// Fields

	private UserSnapshot userSnapshot;
	private Destination destination;

	// Constructors

	/** default constructor */
	public UserSnapDestId() {
	}

	/** full constructor */
	public UserSnapDestId(UserSnapshot userSnapshot, Destination destination) {
		this.userSnapshot = userSnapshot;
		this.destination = destination;
	}

	// Property accessors

	public UserSnapshot getUserSnapshot() {
		return this.userSnapshot;
	}

	public void setUserSnapshot(UserSnapshot userSnapshot) {
		this.userSnapshot = userSnapshot;
	}

	public Destination getDestination() {
		return this.destination;
	}

	public void setDestination(Destination destination) {
		this.destination = destination;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof UserSnapDestId))
			return false;
		UserSnapDestId castOther = (UserSnapDestId) other;

		return ((this.getUserSnapshot() == castOther.getUserSnapshot()) || (this
				.getUserSnapshot() != null
				&& castOther.getUserSnapshot() != null && this
				.getUserSnapshot().equals(castOther.getUserSnapshot())))
				&& ((this.getDestination() == castOther.getDestination()) || (this
						.getDestination() != null
						&& castOther.getDestination() != null && this
						.getDestination().equals(castOther.getDestination())));
	}

	public int hashCode() {
		int result = 17;

		result = 37
				* result
				+ (getUserSnapshot() == null ? 0 : this.getUserSnapshot()
						.hashCode());
		result = 37
				* result
				+ (getDestination() == null ? 0 : this.getDestination()
						.hashCode());
		return result;
	}

}